<template>
  <div class="bl-search">
    <el-empty v-if="dataSource.length === 0" description="未创建模板"></el-empty>
    <el-tabs v-else v-model="activeName" style="height: 100%;width: 100%">
      <el-tab-pane v-for="option in dataSource" :key="option.excelId" :label="option.excelName" :name="option.excelId">
        <docx-report :excel-template="option" />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
import ExcelTemplate from "@/views/bl/ExcelTemplate.vue";
import IdeaTable from "@/mixins/IdeaTable";
import DocxReport from "@/views/bl/DocxReport.vue";

/**
 * <p>
 * 作用描述
 * </p>
 *
 * @author 62688
 * @since  2024/4/27 23:23
 */
export default {
  name: "DocxReportManage",
  components: {DocxReport, ExcelTemplate},
  mixins: [IdeaTable],
  data() {
    return {
      leftWidth: 20,
      activeName: ''
    }
  },
  created() {
    this.queryUrl = '/excelTemplate/queryPage'
    this.rowKey = 'excelId'
    this.loadSource()
  },
  methods: {
    loadComplate() {
      if (this.dataSource.length > 0) {
        this.activeName = this.dataSource[0].excelId
      }
    }
  }
}
</script>

<style lang="scss">
  .bl-search {
    height: 100%;
    width: 100%;
    overflow: hidden;
    .el-tabs__item {
      height: 20px;
      line-height: 20px;
    }
  }
</style>